package com.mathdroid.model.buffs;

import java.io.Serializable;

import com.mathdroid.model.enums.EBuffType;

/**
 * A group buff or debuff is a buff that one character can bring to the whole 
 * group. So a character can have this buff, although it cannot buff it itself.
 */
public final class GroupBuffDebuff implements Serializable {
	/**
	 * Generated UID.
	 */
	private static final long serialVersionUID = 3488229766366292701L;
	
	/**
	 * The name of the buff.
	 */
	private String name = null;
	
	/**
	 * The icon name of the buff.
	 */
	private String iconName = null;
	
	/**
	 * If the buff is active.
	 */
	private boolean active = false;
	
	/**
	 * The ToolTip text.
	 */
	private String toolTipText = null;
	
	/**
	 * The type of this buff.
	 */
	private EBuffType type = null;
	
	/**
	 * Create a new group buff or debuff.
	 * @param n Name.
	 * @param in Icon name.
	 * @param ttt ToolTip Text.
	 * @param t Buff type.
	 */
	public GroupBuffDebuff(final String n, final String in, final String ttt, 
			final EBuffType t) {
		this.name = n;
		this.iconName = in;
		this.toolTipText = ttt;
		this.setType(t);
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @return the iconName
	 */
	public String getIconName() {
		return iconName;
	}

	/**
	 * @return If this buff or debuff is active.
	 */
	public boolean isActive() {
		return active;
	}
	
	/**
	 * Set if the buff is active.
	 * @param b If the buff is active.
	 */
	public void setActive(final boolean b) {
		this.active = b;
	}

	/**
	 * @return the toolTipText
	 */
	public String getToolTipText() {
		return toolTipText;
	}

	/**
	 * @param t the type to set
	 */
	public void setType(final EBuffType t) {
		this.type = t;
	}

	/**
	 * @return the type
	 */
	public EBuffType getType() {
		return type;
	}
}
